package com.example.springmvc;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 *
 * <a href="http://localhost:8080/springmvc/Hello">...</a>
 * @author lei yu
 * @date 2024/05/16
 */
@Controller
public class HelloController {

    /**
     * RequestMapping  将方法映射给对应的url请求处理
     */
    @RequestMapping("/Hello")
    public String hello() {
        System.out.println("HelloController.hello");
        // 响应
        // redirect 重定向
        // forward  转发  默认
        return "index.jsp";
    }
}
